<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="author" content="宋典花">
    <link rel="stylesheet" href="/css/public.css">
    <link rel="stylesheet" href="/css/bootstrap.css">
    <script src="/js/jquery.js"></script>
    <script src="/js/angular.js"></script>
    <script src="/js/public.js"></script>
    <script src="/js/bootstrap.js"></script>
    <script src="/js/popup.js"></script>
    <title><%= title %></title>
</head>
<body>
<!--回到顶部图片按钮-->
<img src="/images/top.png" alt="" class="goTop">
<script>
    //       用弹窗插件接收下状态给予用户提示
    $(function () {
        var success = '<%= success %>'
        var error = '<%= error %>'
        if (success) {
            $.popup(success);
            setTimeout(function () {
                $('.popup').fadeOut();
                //弹窗消失后重新加载页面
                location.reload();
            }, 1000)

        }
        if (error) {
            $.popup(error);
            setTimeout(function () {
                //弹窗消失后重新加载页面 防止第二次进入此页面弹窗出现
                $('.popup').fadeOut();
                location.reload();
            }, 1000)
        }

        //回到顶部按钮
        $(window).scroll(function () {
            var sc = $(window).scrollTop();
            if (sc > 0) {
                $('.goTop').css({"display": "block", "top": $(window).height() - 150});
            } else {
                $('.goTop').css('display', 'none')
            }

        })
        $('.goTop').click(function () {
            $('body,html').animate({scrollTop: 0}, 500);
            $(this).animate({top: -200}, 500)
        });
    });
</script>
